// *********************************************************
//      Copyright (c) Kosta Gaitanis
//      All rights reserved
//
//      k.gaitanis@gmail.com
//
// *********************************************************

#ifndef MATERIAL_H
#define MATERIAL_H

#include <QtOpenGL/QtOpenGL>

/**
 * @brief The Material class implements a material in openGL that can be applied
 * to items.
 * @author Kosta Gaitanis
 */
class Material
{
public:
    /**
     * @brief Contrsuctor
     * @param name of this material
     */
    Material(const QString& name = "");

    /**
     * Destructor
     */
    ~Material();

    /**
     * @brief Copy Constructor
     * @param other material to be copied
     */
    Material(const Material& other);

    /**
     * @brief operator =
     * @param other material to be copied into this one
     * @return this material
     */
    Material& operator =(const Material& other);

    /**
     * @brief paints this material
     */
    void paint();

    void setAmbient(const QColor& ambient);
    void setEmission(const QColor& emission);
    void setDiffuse(const QColor& diffuse);
    void setSpecular(const QColor& specular);
    void setShininess(double shininess);

    QColor getAmbient() const;
    QColor getEmission() const;
    QColor getDiffuse() const;
    QColor getSpecular() const;
    GLfloat getShininess() const;

    const QString& getName() const;

private:
    QString m_name;
    GLfloat m_ambient[4];
    GLfloat m_emission[4];
    GLfloat m_diffuse[4];
    GLfloat m_specular[4];
    GLfloat m_shininess;


};

#endif // MATERIAL_H
